<div class="row">
    <div class="col-xs-4">
        <div class="card">
            <div class="card-header">
                <div class="card-title">
                    <div class="title">菜单树</div>
                </div>
            </div>
            <div class="card-body">
                    <div id="menu-tree">
                    </div>
           </div>
        </div>
    </div>
    <div class="col-xs-8">
        <div class="card">
            <div class="card-header">
                <div class="card-title">
                    <div class="title">菜单信息</div>
                </div>
            </div>
            <div class="card-body">
                    <form class="form-horizontal">
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
                            <div class="col-sm-10">
                                <input type="email" class="form-control" id="inputEmail3" placeholder="Email"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
                            <div class="col-sm-10">
                                <input type="password" class="form-control" id="inputPassword3" placeholder="Password"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox"/> Remember me
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">Sign in</button>
                            </div>
                        </div>
                    </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" th:src="@{/js/plugins/treeview/bootstrap-treeview.js}"></script>
<script type="text/javascript" th:src="@{/js/plugins/treeview/bootstrap-treeview.js}"></script>
<script>
    var tree = [
        {
            text: "Parent 1",
            nodes: [
                {
                    text: "Child 1",
                    nodes: [
                        {
                            text: "Grandchild 1"
                        },
                        {
                            text: "Grandchild 2"
                        }
                    ]
                },
                {
                    text: "Child 2"
                }
            ]
        },
        {
            text: "Parent 2"
        },
        {
            text: "Parent 3"
        },
        {
            text: "Parent 4"
        },
        {
            text: "Parent 5"
        }
    ];
    $('#tree').treeview({data: tree});
    $('#tree').on('nodeSelected', function(event, data) {
        // 事件代码...
        alert('选中事件');
    });
</script>
